/*
 * SampleCollector.h
 *
 *  Created on: May 16, 2010
 *      Author: Soheil Damangir
 */

#ifndef SAMPLECOLLECTOR_H_
#define SAMPLECOLLECTOR_H_
# include <string>

# include "log.h"
# include "image.h"
# include "image_processor.h"
# include "jpeg_buffer.h"
# include "camera_reader.h"

using namespace std;
using namespace kthrobot;
namespace Group5 {
class SampleCollector: public ProcessingTask {
  char pref[128];
  int image_no_;
  JPEGBuffers jpeg_buffers;
  JPEGQueue jpeg_queue;
  CameraReader* cam_reader;
  ImageProcessor* processor;
  void init();
  SampleCollector(const char* _pref);
  SampleCollector();
public:
  static string PREF;
  static SampleCollector&get(){
    static SampleCollector sc(PREF.c_str());
    return sc;
  }
  virtual ~SampleCollector();
  void Collect();
  void Stop();

  void ProcessImage(Image *image);
};
}

#endif /* SAMPLECOLLECTOR_H_ */
